<style>
  .form-inline span {min-width: 70px;}
  .form-inline .form-control {width: 140px;}
  .table td {word-break:break-all; word-wrap:break-word; overflow:hidden}
  .dialog-content p {width: 100%; text-align: center; line-height: 100px; font-size: 16px;}
</style>

<div class="crumbs" >
  <h3>账单列表</h3>
  <p>账单管理 > 账单列表</p>
</div>

<div class="content-box" >
  <div class="form-inline form-group"  >
    <select class="form-control input-sm " ng-model="list.billType" ng-change=changeType(list.billType) ng-init="list.billType = 'default' ">
      <option value="default" style="display:none;"></option>
      <option  ng-repeat="v in billTypes" value="{{v.code}}"  ng-selected="v.code==2">{{v.desc}}</option>
    </select>
    <select class="form-control input-sm " ng-options="v.code as v.desc for v in billContentTypes" ng-model="list.billContentType"   >
      <option value="">--账单内容不限--</option>
    </select>
    <select class="form-control input-sm "   ng-options="v.code as v.desc for v in billStatusTypes" ng-model="list.status"   >
      <option value="">--账单状态不限--</option>
    </select>
    <div class="inline-block f12 float-right">
      <input type="text" class="form-control input-sm"  maxlength="16" size="30" ng-model="list.billNumQueryKey" placeholder="账单编号">
      <input type="text" class="form-control input-sm"  size="30" ng-model="list.companyNameQueryKey" placeholder="装修公司">
      <input type="text" class="form-control input-sm"  maxlength="30" size="30" ng-model="list.customerNameQueryKey" placeholder="客户名称">
      <input type="text" class="form-control input-sm"  maxlength="11" size="30" ng-model="list.customerPhoneQueryKey" placeholder="客户电话">
      <button   type="button" class="btn btn-primary btn-sm  input-sm " ng-click="submitSearch(list)">查询</button>
    </div>
  </div>

  <table class=" table   table-hover table-condensed  table-striped text-center " style="table-layout:fixed">
    <thead style="background:#8A8BC4; color: #fff">
      <tr>
        <td>账单编号</td>
        <td>账单类型</td>
        <td>账单内容</td>
        <td>客户名称</td>
        <td>装修公司</td>
        <td>客户电话</td>
        <td>支付方式</td>
        <td>金额</td>
        <td>现金</td>
        <td>抵扣券</td>
        <td>状态</td>
        <td>付款时间</td>
        <td>是否打款</td>
        <td width="15%">备注</td>
        <td>操作</td>
      </tr>
    </thead>

    <tbody>
      <tr ng-repeat="g in grid.result">
        <td ng-bind="g.billNumber"></td>
        <td ng-bind="g.billType"></td>  
        <td ng-bind="g.billContent"></td>
        <td ng-bind="g.customerName"></td>
        <td ng-bind="g.companyName"></td>
        <td ng-bind="g.customerPhone"></td>
        <td ng-bind="g.payToolStr"></td>
        <td ng-bind="g.amount"></td>
        <td ng-bind="g.cashAmount "></td>
        <td>{{g.couponAmount }}({{g.couponCount||0}}张)</td>
        <td ng-bind="g.statusStr"></td>
        <td ng-bind="g.time | date:'yyyy-MM-dd HH:mm:ss'"></td>
        <td ng-if="g.whetherTransfer">是</td>
        <td ng-if="!g.whetherTransfer">否</td>
        <td ng-bind="g.postscript"></td>
        <td>
          <button class="btn btn-primary btn-xs" ng-show="g.canCheckTransfer" data-target='.billModal' data-toggle='modal' ng-click="bootDialog(g.billId)">打款</button>
        </td>
      </tr>
      <tr ng-if="!grid.result"><td colspan="15" class="f12 c-999 " >没有相关数据!</td></tr>
    </tbody>
  </table>
  <div ng-include="'/templates/partial/page.html'" style="height: 50px;background-color: #f4f4f6"></div>
</div>

<!--dialog-->
<div class="modal fade billModal" >
  <div class="modal-dialog ">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title"><b>提示</b></h4>
      </div>
      <div class="modal-body">
        <div class="dialog-content lh200 form-inline form-group">
          <div>
            <p>您确定该费用已线下打给装修公司了吗？</p>
          </div>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" >取消</button>
        <button type="button" class="btn btn-danger" ng-click="submit(dialog)">确定</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->




